/*
 * @Author: upp24 1246815351@qq.com
 * @Date: 2023-06-13 09:09:57
 * @LastEditors: upp24 1246815351@qq.com
 * @LastEditTime: 2023-09-14 17:11:40
 * @FilePath: /pure-admin-thin-i18n/src/api/message.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type BannerResult = {
  page: number;
  pagesize: number;
  success: boolean;
  code: number;
  token: string;
  msg: string;
  data: {
    img(img: any): string;
    data: any[];
    total: number;
    page: number;
    pagesize: number;
  };
};
/** 留言列表*/
export const messageList = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("feedback/list"), {
    data
  });
};
/** 留言信息*/
export const messageInfo = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("feedback/info"), {
    data
  });
};
/** 留言修改*/
export const messageUpdate = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("feedback/update"), {
    data
  });
};
/** 留言删除*/
export const messageDelete = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("feedback/delete"), {
    data
  });
};
/** 信箱列表*/
export const mailboxList = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("director/list"), {
    data
  });
};
/** 信箱信息*/
export const mailboxInfo = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("director/info"), {
    data
  });
};
/** 信箱修改*/
export const mailboxUpdate = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("director/update"), {
    data
  });
};
/** 信箱删除*/
export const mailboxDelete = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("director/delete"), {
    data
  });
};
